
package com.uit.ecommerce.bo;

import com.uit.ecommerce.access.mapper.NewsMapper;
import com.uit.ecommerce.dto.NewsDTO;
import java.util.ArrayList;

public class NewsBO {
public ArrayList<NewsDTO> GetAllNews() throws Exception{
    NewsMapper NM=new NewsMapper();
    return NM.GetAllNews();
}
public void InsertNews(NewsDTO cls) throws Exception{
     NewsMapper NM=new NewsMapper();
     NM.insertNews(cls);
}
public void DeleteNews(String Id) throws Exception{
     NewsMapper NM=new NewsMapper();
     NM.DeleteNews(Id);
}
public NewsDTO getNewInfo(String Id) throws Exception{
    NewsMapper NM=new NewsMapper();
    return NM.getNewInfo(Id);
}
public ArrayList<NewsDTO> getNewByDate(String Date) throws Exception{
    NewsMapper NM=new NewsMapper();
    return NM.getNewByDate(Date);
}
public ArrayList<NewsDTO> getNewByAuthor(String Author) throws Exception{
    NewsMapper NM=new NewsMapper();
    return NM.getNewByAuthor(Author);
}
public boolean CheckNewsExit(String Id) throws Exception{
    NewsMapper NM=new NewsMapper();
    return NM.checkNewsExit(Id);
}
}
